[XEN][POWERPC] New interface ATTN() to conact the HW probe
authorJimi Xenidis <jimix@watson.ibm.com>
Tue, 10 Oct 2006 13:11:32 +0000 (09:11 -0400)
committerJimi Xenidis <jimix@watson.ibm.com>
Tue, 10 Oct 2006 13:11:32 +0000 (09:11 -0400)
Sometimes it is useful to have your code contact the HW probe directly
rather than call BUG().
Signed-off-by: Jimi Xenidis <jimix@watson.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
--HG--
extra : transplant_source : %05%C8%CE%1Di%7C%D7%D1j%DB%FBpf%80%AD%FB%95%D4I%0F

xen/arch/powerpc/setup.c
xen/include/asm-powerpc/debugger.h

index 31f7a7d694d10c12626da6283d10968152e3f30e..c31fa1cd7ecd95cf688c3205ab12bde9dd9773ab 100644 (file)
@@ -111,12 +111,20 @@ static void __init do_initcalls(void)
     }
 }
 
-static void hw_probe_attn(unsigned char key, struct cpu_user_regs *regs)
+
+void noinline __attn(void)
 {
     /* To continue the probe will step over the ATTN instruction.  The
      * NOP is there to make sure there is something sane to "step
      * over" to. */
-    asm volatile(".long 0x00000200; nop");
+    console_start_sync();
+    asm volatile("attn");
+    console_end_sync();
+}
+
+static void hw_probe_attn(unsigned char key, struct cpu_user_regs *regs)
+{
+    __attn();
 }
 
 static void percpu_init_areas(void)
index 6fea7a3958461872b5d33b8e57a4dd1867c9efe5..9ef2e375ea97712b850d1b8447df6f03ef93ca74 100644 (file)
@@ -68,6 +68,9 @@ extern void __warn(char *file, int line);
 #define WARN() __warn(__FILE__, __LINE__)
 #define WARN_ON(_p) do { if (_p) WARN(); } while ( 0 )
 
+extern void __attn(void);
+#define ATTN() __attn();
+
 #define FORCE_CRASH() __force_crash()
 
 #ifdef CRASH_DEBUG